package com.chinasoft.domain;

import com.fasterxml.jackson.annotation.JsonFormat;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;

import java.util.Date;
@Data
@AllArgsConstructor
@NoArgsConstructor
public class Person {
    private Integer id;
    private String name;
    private Integer age;
    //作用：将Date按照指定的格式转换为字符串  {"id":1,"name":"wangergou","age":22,"birthday":"2023-09-07 03:00:15"}
    @JsonFormat(pattern = "yyyy-MM-dd hh:mm:ss")
    private Date birthday;
}
